package java69.work720;

public class Student3 extends Person3 {
    protected int id;
    protected   String date;
    protected String major;


    public Student3(String name, String sex, int age, int id, String date, String major) {
        super(name, sex, age);
        this.id = id;
        this.date = date;
        this.major = major;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public String toString() {
        return "我叫"+super.getName()+",性别"+super.getSex()+",今年"+super.getAge()+
                "，学号为"+getId()+",入学日期是"+getDate()+",专业是"+getMajor();
    }

    public static void main(String[] args) {
        Student3 student3 = new Student3("小王","男",20,113,"2020/07/05","Java");
        System.out.println(student3.toString());
    }
}
